package com.sfdk.admin.ui.constants.spritesheetEditor
{

public class SpritesheetDataType
	{
		public static const JOUEUR_TYPE : SpritesheetDataType = new SpritesheetDataType("joueur");
		public static const NPC_TYPE : SpritesheetDataType = new SpritesheetDataType("npc");
		public static const ANIMAUX_TYPE : SpritesheetDataType = new SpritesheetDataType("animaux");
		public static const VETEMENTS_TYPE : SpritesheetDataType = new SpritesheetDataType("vetements");
        public static const FORCE_TYPE : SpritesheetDataType = new SpritesheetDataType("force");
        public static const MONSTERS_TYPE : SpritesheetDataType = new SpritesheetDataType("monsters");
		
		public function SpritesheetDataType(type: String)
		{
			_type = type;
		}
		
		private var _type : String;
		
		public static function getType(value : String) : SpritesheetDataType
		{
			switch(value)
			{
				case "joueur":
					return JOUEUR_TYPE;	
				break;
				
				case "npc":
					return NPC_TYPE;
				break;
				
				case "animaux":
					return ANIMAUX_TYPE;
					break;
				
				case "vetements":
					return VETEMENTS_TYPE;
				break;

                case "force":
					return FORCE_TYPE;
				break;

                case "monsters":
					return MONSTERS_TYPE;
				break;
			}
			return null;
		}
		
		public function getAvailableFace() : Array
		{
			switch(_type)
			{
				case "force": case "monsters": default:
					return ["Front", "Back", "Left", "Right"];
				break;
			}
			return null;
		}
		
		public function getAvailableAction() : Array
		{
			switch(_type)
			{
				case "force": case "monsters": default:
					return ["Still", "Walking"];
					break;
			}
			return null;
		}
	}
	
	
}